<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>苏轻的武神小站</title>

    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <!-- <script src="wsmud.js"></script> -->
    <style>
        * {
            margin: 0; /*消除格式*/
            padding: 0;
            /* user-select: none; 无法直接复制文本 */
            -webkit-user-select: none; /* Chrome && Safari */
            -moz-user-select: none; /* Firefox */
            -ms-user-select: none; /* IE */
        }
        input, .editable_td {
            -webkit-user-select: text; /* Chrome && Safari */
            -moz-user-select: text; /* Firefox */
            -ms-user-select: text; /* IE */
        }
        html, body {
            width: 100%;
            height: 100%;
            color: #FFFFFF;
            background-color: #000000;
        }
        .main {
            width: 800px;
            height: 100%;
            margin: 0 auto;
            background-color: #080808;
        }
        .header {
            width: 100%;
            height: 150px;
        }
        @font-face {
            font-family: "wscs";
            src: url("font/wscs/wscs.woff") format("woff"),
                url("font/wscs/wscs.ttf") format("truetype"),
                url("font/wscs/wscs.svg") format("svg");
            font-weight: normal;
            font-style: normal;
        }
        .header .title {
            height: 120px;
            line-height: 120px;
            font-size: 60px;
            font-family: wscs;
            padding-left: 30px;
        }
        .header .title a {
            color: #FFFFFF;
            text-decoration: none;
        }
        .header .subtitle {
            height: 30px;
            line-height: 30px;
            float: right;
            font-size: 16px;
            font-family: serif;
            margin-top: 90px;
            margin-right: 30px;
        }
        .header .console {
            height: 30px;
            line-height: 30px;
            background-color: #101010;
            text-align: center;
        }
        .left {
            float: left;
            width: 150px;
            background-color: #050505;
        }
        .left ul {
            list-style: none;
        }
        .left a {
            display: block;
            width: 100px;
            height: 30px;
            margin: 0 auto;
            line-height: 30px;
            text-align: center;
            color: #FFFFFF;
            text-decoration: none;
            border: 1px solid #808080;
        }
        .left a:hover {
            background-image: linear-gradient(to right, #404040, #808080, #404040);
        }
        .left hr {
            width: 100%;
            margin-top: 16px;
            margin-bottom: 16px;
            border: 0;
            height: 2px;
            background-image: linear-gradient(to right, #000000, #FFFFFF, #000000);
        }
        .left .qq {
            width: 80%;
            padding-left: 10%;
            color: #808080;
            text-align: center;
            font-size: 13px;
        }
        .right {
            float: left;
            width: 650px;
            background-color: #080808;
        }
        .footer {
            width: 100%;
            height: 24px;
            line-height: 24px;
            text-align: center;
            color: #808080;
        }
        .footer a {
            color: #808080;
            text-decoration: none;
        }
        .footer a:hover {
            color: #00ff00;
        }
        .clear {
            clear: both;
        }
        /* color */
        .color_0 { color: #FFFFFF }
        .color_1 { color: #00FF00 }
        .color_2 { color: #00FFFF }
        .color_3 { color: #FFFF00 }
        .color_4 { color: #912CEE }
        .color_5 { color: #FFA500 }
        .color_6 { color: #FF0000 }
        /* role.html */
        .roleList table{
            width: 80%;
            margin: 30px auto;
            border-collapse: collapse;
        }
        .roleList td {
            height: 1.5em;
            line-height: 1.5em;
            /* font-size: 16px; */
            text-align: center;
            border: 1px solid #808080;
        }
        .toggleDiv, .addRole {
            width: 80%;
            margin: 0 auto;
            text-align: center;
            border: 1px solid #808080;
        }
        .addRole div {
            height: 40px;
            line-height: 40px;
        }
        .addRole button {
            width: 100px;
            height: 32px;
        }
        /* skill.html */
        .addSkillDiv {
            text-align: center;
        }
        /* .skill_selector1 {
            margin-top: 20px;
            margin-left: 30px;
        } */
        .addSkillButton {
            margin-left: 10px;
            width: 100px;
            height: 20px;
        }
        .skillTable {
            border-collapse: collapse;
        }
        .skillTable td {
            height: 1.5em;
            line-height: 1.5em;
            text-align: center;
            border: 1px solid #FFFFFF;
        }
        .editable_td {
            background-color: #202020;
        }
        /*  */
        .work_table, .toLevel_table {
            margin: 2em auto;
            border-collapse: collapse;
        }
        .work_table td {
            width: 7em;
            height: 1.5em;
            line-height: 1.5em;
            text-align: center;
            border: 1px solid #FFFFFF;
        }
        td {
            height: 1.5em;
            line-height: 1.5em;
            text-align: center;
            border: 1px solid #FFFFFF;
        }
        .work_code_div {
            color: #008000;
            overflow: visible; /*自动换行/自适应高度*/
            text-align: left;
        }
    </style>
</head>
<body>
    <div class="main">
        <div class="header">
            <div class="title">
                <a href="">武神传说</a>
                <span class="subtitle">一切为了更好地挖矿！</span>
            </div>
            <div class="console">欢迎访问本站</div>
        </div>
        <div class="left">
                <ul>
                    <hr>
                    <li><a class="leftBar role">角色档案</a></li>
                    <hr>
                    <li><a class="leftBar skill">技能设定</a></li>
                    <li><a class="leftBar work">练习计算</a></li>
                    <!-- 
                    <hr>
                    <li><a class="leftBar">武道模拟</a></li>
                    <li><a class="leftBar">武道流程</a></li>
                    <hr>
                    <li><a class="leftBar">装备数据</a></li>
                    <li><a class="leftBar">药方数据</a></li>
                    <hr>
                    <li><a class="leftBar">更新历程</a></li>
                    <li><a class="leftBar">关于作者</a></li>
                    <li><a class="leftBar">其他链接</a></li> -->
                    <hr>
                    <div class="qq">QQ群 953279200<br>加入我们<br>研究更好的挖矿姿势</div>
                </ul>
        </div>
        <div class="right">
            首页
        </div>
        <div class="clear"></div>
        <div class="footer">

        </div>
    </div>
</body>
</html>


<script>
layout = {
    setSize : function() {
        var window_h = $(window).height();
        var header_h = $(".header").height();
        var footer_h = $(".footer").height();
        $(".left").height(window_h - header_h - footer_h);
        $(".right").height(window_h - header_h - footer_h);
        console.log("Set size.");
    },
    leftBarName : ["role", "skill", "work"],
    setLeftBar : function() {
        $(".leftBar").attr({
            "href" : " ",
            "onclick" : "return false",
        });
        for (let i = 0; i < this.leftBarName.length; i++) {
            const className = this.leftBarName[i];
            $("."+className).click(function() {
                $(".right").load("./" + className + ".html");
                console.log("Load: " + className + ".html");
            });
        }
    },
    setFooter: function() {
        var date = new Date();
        var year = date.getFullYear();
        var footer = "Copyright &copy; 2018 - " + year;
        $(".footer").html(footer + " <a href='https://suqing.fun'>suqing.fun</a> All rights Reserved.");
    },
}
costQian = function(skill) {
    console.log("计算潜能");
    var l = skill.level;
    var l2 = skill.levelTo;
    if (l > l2) {
        return 0;
    }
    var k = skill.color + 1;
    var cost = k*2.5*(l2*l2 - l*l);
    return cost;
}
window.addEventListener("load", function() {
    layout.setSize();
    layout.setLeftBar();
    layout.setFooter();
});
window.addEventListener("resize", function() {
    timeout.ids.push(setTimeout(function() {
        if (timeout.actionTime < timeout.timestamp()) {
            layout.setSize();
            timeout.clear();
        }
    }, 1000));
    timeout.actionTime = timeout.timestamp() + 1000;
});

// window.onload = function() {
//     layout.setSize();
//     layout.setLeftBar();
//     layout.setFooter();
// }
// window.onresize = function() {
//     timeout.ids.push(setTimeout(function() {
//         if (timeout.actionTime < timeout.timestamp()) {
//             layout.setSize();
//             timeout.clear();
//         }
//     }, 1000));
//     timeout.actionTime = timeout.timestamp() + 1000;
// }
timeout = {
    ids : [],
    actionTime : 0,
    clear : function() {
        for (let i = 0; i < timeout.ids.length; i++) {
            const id = timeout.ids[i];
            clearTimeout(id);
        }
        ids = [];
        console.log("Clear all timeout.");
    },
    timestamp : function() {
        var time = Date.parse(new Date()).toString();
        return time;
    }
}

// 用户数据
var userData = {
    index : 0,
    roles : [
        {
            name:"苏轻预设",
            jj:"武圣",
            fwq:"四区",
            mp:"峨眉派",
            skills : [],
            wudaos : [],
            varsion : "20190304"
        },
    ],
    getSkills : function() {
        return this.roles[this.index].skills;
    },
    addSkillById : function(skid) {
        var skill = getSkillById(skid);
        skill.level = 0;
        skill.levelTo = 0;
        skill.isPractice = false;
        this.roles[this.index].skills.push(skill);
        this.save();
    },
    delSkillById : function(skid) {
        for (let i = 0; i < this.getSkills().length; i++) {
            const skill = this.getSkills()[i];
            if (skill.skid == skid) {
                console.log(this.getSkills());
                this.getSkills().splice(i, 1);
                console.log(this.getSkills());
                this.save();
                return;
            }
        }
    },
    setUserSKillLevelById : function(skid, level) {
        for (let i = 0; i < this.getSkills().length; i++) {
            const skill = this.getSkills()[i];
            if (skill.skid == skid) {
                this.getSkills()[i].level = level;
                this.save();
                return;
            }
        }
    },
    setUserSKillLevelToById: function(skid, levelTo) {
        for (let i = 0; i < this.getSkills().length; i++) {
            const skill = this.getSkills()[i];
            if (skill.skid == skid) {
                this.getSkills()[i].levelTo = levelTo;
                this.save();
                return;
            }
        }
    },
    getUserSkillBySkid: function(skid) {
        for (let i = 0; i < this.getSkills().length; i++) {
            var skill = this.getSkills()[i];
            if (skill.skid == skid) return skill;
        }
    },
    load: function() {
        userData.index = JSON.parse(localStorage.getItem("index"));
        userData.roles = JSON.parse(localStorage.getItem("roles"));
        // userData.skills = JSON.parse(localStorage.getItem("skills"));
        // userData.lingwus = JSON.parse(localStorage.getItem("lingwus"));
    },
    save: function() {
        localStorage.setItem("index", JSON.stringify(userData.index));
        localStorage.setItem("roles", JSON.stringify(userData.roles));
        localStorage.setItem("skills", JSON.stringify(userData.skills));
        localStorage.setItem("lingwus", JSON.stringify(userData.lingwus));
    },
    deleteByIndex : function(index) {
        console.log("Delete data by index: " + index);
        if(this.index == index) {
            this.index = 0;
        } else if (this.index > index) {
            this.index --;
        }
        this.roles.splice(index, 1);
        this.skills.splice(index, 1);
        this.lingwus.splice(index, 1);
        this.save();
    },
    clear: function() {
        localStorage.clear();
    },
}

// 检查是否支持本地缓存 localStorage
if (window.localStorage) {
    if (localStorage.getItem("index")) {
        userData.load();
    } else {
        userData.save();
    }
} else {
    alert("请退出浏览器的隐私模式，否则无法使用本地缓存！");
}
</script>




<script> // 技能颜色(白0绿1蓝2黄3紫4橙5红6)
const skillData = {
    "基础技能" : [
        { name : "基本内功", color : 0, skid : "force", type1 : "0", type2 : "0" },
        { name : "基本轻功", color : 0, skid : "dodge", type1 : "0", type2 : "0" },
        { name : "基本拳脚", color : 0, skid : "unarmed", type1 : "0", type2 : "0" },
        { name : "基本招架", color : 0, skid : "parry", type1 : "0", type2 : "0" },
        { name : "基本刀法", color : 0, skid : "blade", type1 : "0", type2 : "0" },
        { name : "基本剑法", color : 0, skid : "sword", type1 : "0", type2 : "0" },
        { name : "基本棍法", color : 0, skid : "club", type1 : "0", type2 : "0" },
        { name : "基本杖法", color : 0, skid : "staff", type1 : "0", type2 : "0" },
        { name : "基本鞭法", color : 0, skid : "whip", type1 : "0", type2 : "0" },
        { name : "基本暗器", color : 0, skid : "throwing", type1 : "0", type2 : "0" },
    ],
    "武当派" : [
        { name : "太极拳(进阶)", color : 4, skid : "taijiquan2", type1 : "拳脚", type2 : "招架" },
        { name : "梯云纵(进阶)", color : 4, skid : "tiyunzong2", type1 : "轻功", type2 : "无" },
        { name : "太极剑法(进阶)", color : 5, skid : "taijijian2", type1 : "无", type2 : "无" },
        { name : "先天太极(进阶)", color : 5, skid : "taijishengong2", type1 : "无", type2 : "无" },
        { name : "梯云纵", color : 2, skid : "tiyunzong", type1 : "0", type2 : "0" },
        { name : "太极神功", color : 3, skid : "taijishengong", type1 : "0", type2 : "0" },
        { name : "太极拳", color : 3, skid : "taijiquan", type1 : "0", type2 : "0" },
        { name : "太极剑法", color : 4, skid : "taijijian", type1 : "0", type2 : "0" },
        { name : "武当心法", color : 1, skid : "wudangxinfa", type1 : "内功", type2 : "无" },
        { name : "武当剑法", color : 1, skid : "wudangjianfa", type1 : "武器", type2 : "无" },
        { name : "武当长拳", color : 1, skid : "wudangchangquan", type1 : "拳脚", type2 : "无" },
    ],
    "少林派" : [
        { name : "一苇渡江(进阶)", color : 4, skid : "shaolinshenfa2", type1 : "轻功", type2 : "无" },
        { name : "一指禅(进阶)", color : 4, skid : "yizhichan2", type1 : "拳脚", type2 : "无" },
        { name : "燃木刀法(进阶)", color : 5, skid : "ranmudao2", type1 : "无", type2 : "无" },
        { name : "金刚不坏体(进阶)", color : 5, skid : "yijinjing2", type1 : "无", type2 : "无" },
        { name : "少林身法", color : 1, skid : "shaolinshenfa", type1 : "0", type2 : "0" },
        { name : "燃木刀法", color : 3, skid : "ranmudao", type1 : "0", type2 : "0" },
        { name : "一指禅", color : 3, skid : "yizhichan", type1 : "0", type2 : "0" },
        { name : "易筋经", color : 4, skid : "yijinjing", type1 : "0", type2 : "0" },
        { name : "韦陀棍", color : 1, skid : "weituogun", type1 : "武器", type2 : "无" },
        { name : "混元一气", color : 1, skid : "hunyuanyiqi", type1 : "内功", type2 : "无" },
        { name : "伏虎拳", color : 1, skid : "fuhuquan", type1 : "拳脚", type2 : "无" },
        { name : "达摩剑", color : 2, skid : "damojian", type1 : "剑法", type2 : "无" },
        { name : "大力金刚拳", color : 2, skid : "jingangquan", type1 : "拳脚", type2 : "招架" },
    ],
    "华山派" : [
        { name : "劈石破玉拳(进阶)", color : 4, skid : "poyuquan2", type1 : "拳脚", type2 : "招架" },
        { name : "紫霞神功(进阶)", color : 4, skid : "zixiashengong2", type1 : "内功", type2 : "无" },
        { name : "独孤九剑(进阶)", color : 5, skid : "dugujiujian2", type1 : "无", type2 : "无" },
        { name : "狂风快剑(进阶)", color : 5, skid : "kuangfengkuaijian2", type1 : "无", type2 : "无" },
        { name : "劈石破玉拳", color : 1, skid : "poyuquan", type1 : "0", type2 : "0" },
        { name : "紫霞神功", color : 3, skid : "zixiashengong", type1 : "0", type2 : "0" },
        { name : "狂风快剑", color : 3, skid : "kuangfengkuaijian", type1 : "0", type2 : "0" },
        { name : "独孤九剑", color : 4, skid : "dugujiujian", type1 : "0", type2 : "0" },
        { name : "飞燕回翔", color : 1, skid : "feiyanhuixiang", type1 : "轻功", type2 : "无" },
        { name : "华山心法", color : 1, skid : "huashanxinfa", type1 : "内功", type2 : "无" },
        { name : "华山剑法", color : 1, skid : "huashanjianfa", type1 : "武器", type2 : "无" },
        { name : "华山拳法", color : 1, skid : "huashanquanfa", type1 : "拳脚", type2 : "无" },
    ],
    "峨眉派" : [
        { name : "九阴白骨爪(进阶)", color : 4, skid : "jiuyinbaiguzhao2", type1 : "拳脚", type2 : "招架" },
        { name : "诸天化身步(进阶)", color : 4, skid : "zhutianbu2", type1 : "轻功", type2 : "无" },
        { name : "临济十二庄(进阶)", color : 5, skid : "linjizhuang2", type1 : "无", type2 : "无" },
        { name : "倚天剑法(进阶)", color : 5, skid : "yitianjianfa2", type1 : "无", type2 : "无" },
        { name : "诸天化身步", color : 1, skid : "zhutianbu", type1 : "0", type2 : "0" },
        { name : "临济十二庄", color : 3, skid : "linjizhuang", type1 : "0", type2 : "0" },
        { name : "九阴白骨爪", color : 3, skid : "jiuyinbaiguzhao", type1 : "0", type2 : "0" },
        { name : "倚天剑法", color : 4, skid : "yitianjianfa", type1 : "0", type2 : "0" },
        { name : "峨眉心法", color : 1, skid : "emeixinfa", type1 : "内功", type2 : "无" },
        { name : "金顶绵掌", color : 1, skid : "jindingzhang", type1 : "拳脚", type2 : "招架" },
        { name : "回风拂柳剑", color : 2, skid : "huifengjian", type1 : "武器", type2 : "无" },
    ],
    "逍遥派" : [
        { name : "北冥神功(进阶)", color : 4, skid : "beimingshengong2", type1 : "内功", type2 : "招架" },
        { name : "天山六阳掌(进阶)", color : 4, skid : "liuyangzhang2", type1 : "拳脚", type2 : "无" },
        { name : "凌波微步(进阶)", color : 5, skid : "lingboweibu2", type1 : "无", type2 : "无" },
        { name : "小无相功(进阶)", color : 5, skid : "xiaowuxianggong2", type1 : "无", type2 : "无" },
        { name : "凌波微步", color : 3, skid : "lingboweibu", type1 : "0", type2 : "0" },
        { name : "北冥神功", color : 3, skid : "beimingshengong", type1 : "0", type2 : "0" },
        { name : "天山六阳掌", color : 3, skid : "liuyangzhang", type1 : "0", type2 : "0" },
        { name : "小无相功", color : 4, skid : "xiaowuxianggong", type1 : "0", type2 : "0" },
        { name : "如意刀", color : 1, skid : "ruyidao", type1 : "武器", type2 : "无" },
        { name : "逍遥心法", color : 1, skid : "xiaoyaoxinfa", type1 : "内功", type2 : "无" },
        { name : "天山折梅手", color : 2, skid : "zhemeishou", type1 : "拳脚", type2 : "招架" },
    ],
    "丐帮" : [
        { name : "混元天罡(进阶)", color : 4, skid : "huntianqigong2", type1 : "内功", type2 : "无" },
        { name : "逍遥游(进阶)", color : 4, skid : "xiaoyaoyou2", type1 : "轻功", type2 : "无" },
        { name : "打狗棒(进阶)", color : 5, skid : "dagoubang2", type1 : "无", type2 : "无" },
        { name : "降龙十八掌(进阶)", color : 5, skid : "xianglongzhang2", type1 : "无", type2 : "无" },
        { name : "逍遥游", color : 2, skid : "xiaoyaoyou", type1 : "0", type2 : "0" },
        { name : "打狗棒", color : 3, skid : "dagoubang", type1 : "0", type2 : "0" },
        { name : "混天气功", color : 3, skid : "huntianqigong", type1 : "0", type2 : "0" },
        { name : "降龙十八掌", color : 4, skid : "xianglongzhang", type1 : "0", type2 : "0" },
        { name : "叫花棒法", color : 1, skid : "jiaohuabangfa", type1 : "武器", type2 : "招架" },
        { name : "飞檐走壁", color : 1, skid : "feiyanzoubi", type1 : "轻功", type2 : "无" },
        { name : "丐帮心法", color : 1, skid : "gaibangxinfa", type1 : "内功", type2 : "无" },
        { name : "太祖长拳", color : 1, skid : "taizuchangquan", type1 : "拳脚", type2 : "无" },
    ],
    "杀手楼" : [
        { name : "穿心掌(进阶)", color : 4, skid : "chuanxinzhang2", type1 : "拳脚", type2 : "招架" },
        { name : "杀生决(进阶)", color : 4, skid : "shashengjue2", type1 : "内功", type2 : "无" },
        { name : "漫天花雨(进阶)", color : 5, skid : "mantianhuayu2", type1 : "武器", type2 : "无" },
        { name : "踏雪寻梅(进阶)", color : 5, skid : "taxuexunmei2", type1 : "轻功", type2 : "无" },
        { name : "穿心掌", color : 2, skid : "chuanxinzhang", type1 : "0", type2 : "0" },
        { name : "杀生决", color : 3, skid : "shashengjue", type1 : "0", type2 : "0" },
        { name : "踏雪寻梅", color : 3, skid : "taxuexunmei", type1 : "0", type2 : "0" },
        { name : "漫天花雨", color : 4, skid : "mantianhuayu", type1 : "0", type2 : "0" },
        { name : "飞刀", color : 1, skid : "feidao", type1 : "暗器", type2 : "无" },
        { name : "杀手步法", color : 1, skid : "shashoubufa", type1 : "轻功", type2 : "无" },
        { name : "杀手心法", color : 1, skid : "shashouxinfa", type1 : "内功", type2 : "无" },
    ],
    "内功" : [
        { name : "蛤蟆功", color : 4, skid : "hamagong", type1 : "内功", type2 : "拳脚" },
        { name : "化功大法", color : 4, skid : "huagongdafa", type1 : "内功", type2 : "无" },
        { name : "明玉功", color : 4, skid : "mingyugong", type1 : "内功", type2 : "轻功" },
        { name : "枯木神功", color : 4, skid : "kumushengong", type1 : "内功", type2 : "无" },
        { name : "神照经", color : 4, skid : "shenzhaojing", type1 : "内功", type2 : "拳脚" },
        { name : "血海魔功", color : 4, skid : "xuehaimogong", type1 : "内功", type2 : "无" },
        { name : "龙象般若功", color : 5, skid : "longxianggong", type1 : "内功", type2 : "无" },
        { name : "葵花神功", color : 5, skid : "kuihuashengong", type1 : "内功", type2 : "无" },
        { name : "不老长春功", color : 5, skid : "bahuanggong", type1 : "内功", type2 : "无" },
        { name : "九阳神功", color : 5, skid : "jiuyangshengong", type1 : "内功", type2 : "无" },
        { name : "九阴神功", color : 5, skid : "jiuyinshengong", type1 : "内功", type2 : "无" },
        { name : "太玄功", color : 5, skid : "taixuangong", type1 : "内功", type2 : "无" },
        { name : "密宗心法", color : 1, skid : "mizongxinfa", type1 : "内功", type2 : "无" },
        { name : "云龙心法", color : 1, skid : "yunlongxinfa", type1 : "内功", type2 : "无" },
        { name : "冷月神功", color : 1, skid : "lengyueshengong", type1 : "内功", type2 : "无" },
        { name : "神龙心法", color : 2, skid : "shenlongxinfa", type1 : "内功", type2 : "无" },
        { name : "五毒神功", color : 2, skid : "wudushengong", type1 : "内功", type2 : "无" },
        { name : "碧波神功", color : 2, skid : "biboshengong", type1 : "内功", type2 : "无" },
        { name : "白云心法", color : 3, skid : "baiyunxinfa", type1 : "内功", type2 : "无" },
        { name : "镇岳诀", color : 3, skid : "zhenyuejue", type1 : "内功", type2 : "无" },
        { name : "圣火神功", color : 3, skid : "shenghuoshengong", type1 : "内功", type2 : "无" },
    ],
    "轻功" : [
        { name : "神行百变", color : 2, skid : "shenxingbaibian", type1 : "轻功", type2 : "无" },
        { name : "踏歌行", color : 2, skid : "tagexing", type1 : "轻功", type2 : "无" },
        { name : "天南步", color : 2, skid : "tiannanbu", type1 : "轻功", type2 : "无" },
        { name : "金蛇游身步", color : 3, skid : "jinsheyoushenbu", type1 : "轻功", type2 : "无" },
        { name : "五毒烟萝步", color : 3, skid : "wuduyanluobu", type1 : "轻功", type2 : "无" },
        { name : "暗影浮香", color : 3, skid : "anyingfuxiang", type1 : "轻功", type2 : "无" },
        { name : "玄虚步", color : 4, skid : "xuanxubu", type1 : "轻功", type2 : "无" },
        { name : "意形步法", color : 1, skid : "yixingbufa", type1 : "轻功", type2 : "无" },
        { name : "云龙身法", color : 1, skid : "yunlongshenfa", type1 : "轻功", type2 : "无" },
        { name : "金雁功", color : 1, skid : "jinyangong", type1 : "轻功", type2 : "无" },
        { name : "四象步法", color : 2, skid : "sixiangbu", type1 : "轻功", type2 : "无" },
        { name : "恒山身法", color : 2, skid : "hengshanshenfa", type1 : "轻功", type2 : "无" },
        { name : "穿云纵", color : 2, skid : "chuanyunzong", type1 : "轻功", type2 : "无" },
        { name : "蟾蜍步法", color : 2, skid : "chanchubufa", type1 : "轻功", type2 : "无" },
        { name : "青蝠身法", color : 2, skid : "qingfushenfa", type1 : "轻功", type2 : "无" },
    ],
    "拳脚" : [
        { name : "鹰爪功", color : 2, skid : "yingzhuagong", type1 : "拳脚", type2 : "招架" },
        { name : "金蛇游身掌", color : 3, skid : "jinshezhang", type1 : "拳脚", type2 : "无" },
        { name : "大嵩阳神掌", color : 3, skid : "dasongyangshenzhang", type1 : "拳脚", type2 : "无" },
        { name : "七伤拳", color : 3, skid : "qishangquan", type1 : "拳脚", type2 : "招架" },
        { name : "三阴蜈蚣爪", color : 3, skid : "sanyinzhua", type1 : "拳脚", type2 : "招架" },
        { name : "弹指神通", color : 4, skid : "tanzhishengong", type1 : "拳脚", type2 : "无" },
        { name : "空明拳", color : 4, skid : "kongmingquan", type1 : "拳脚", type2 : "无" },
        { name : "参合指", color : 4, skid : "canhezhi", type1 : "拳脚", type2 : "无" },
        { name : "六脉神剑", color : 5, skid : "liumaishenjian", type1 : "无", type2 : "无" },
        { name : "黯然销魂掌", color : 5, skid : "anranxiaohun", type1 : "无", type2 : "无" },
        { name : "密宗大手印", color : 1, skid : "dashouyin", type1 : "拳脚", type2 : "无" },
        { name : "猴拳", color : 1, skid : "houquan", type1 : "拳脚", type2 : "无" },
        { name : "化骨绵掌", color : 2, skid : "huagumianzhang", type1 : "拳脚", type2 : "无" },
        { name : "八卦拳", color : 2, skid : "baguaquan", type1 : "拳脚", type2 : "无" },
        { name : "流云掌", color : 2, skid : "liuyunzhang", type1 : "拳脚", type2 : "无" },
        { name : "泰山拳法", color : 2, skid : "taishanquanfa", type1 : "拳脚", type2 : "招架" },
        { name : "绝情掌", color : 2, skid : "jueqingzhang", type1 : "拳脚", type2 : "无" },
        { name : "天长掌法", color : 3, skid : "tianchangzhang", type1 : "拳脚", type2 : "无" },
        { name : "摧心掌", color : 3, skid : "cuixinzhang", type1 : "拳脚", type2 : "无" },
    ],
    "剑法" : [
        { name : "衡山五神剑", color : 3, skid : "hengshanwushenjian", type1 : "武器", type2 : "招架" },
        { name : "全真剑法", color : 3, skid : "quanzhenjianfa", type1 : "武器", type2 : "无" },
        { name : "辟邪剑法", color : 5, skid : "bixiejianfa", type1 : "无", type2 : "无" },
        { name : "玄铁剑法", color : 5, skid : "xuantiejianfa", type1 : "无", type2 : "无" },
        { name : "神龙剑", color : 1, skid : "shenlongjian", type1 : "武器", type2 : "无" },
        { name : "唐诗剑法", color : 1, skid : "tangshijianfa", type1 : "武器", type2 : "无" },
        { name : "云龙剑", color : 2, skid : "yunlongjian", type1 : "武器", type2 : "无" },
        { name : "圣火令法", color : 2, skid : "shenghuojianfa", type1 : "武器", type2 : "无" },
        { name : "金蛇剑法", color : 3, skid : "jinshejianfa", type1 : "武器", type2 : "无" },
        { name : "五毒钩法", color : 3, skid : "wudugoufa", type1 : "武器", type2 : "无" },
        { name : "恒山剑法", color : 3, skid : "hengshanjianfa", type1 : "武器", type2 : "无" },
        { name : "松风剑法", color : 3, skid : "songfengjianfa", type1 : "武器", type2 : "招架" },
        { name : "嵩山剑法", color : 3, skid : "songshanjianfa", type1 : "武器", type2 : "招架" },
        { name : "落英神剑", color : 3, skid : "luoyingshenjian", type1 : "武器", type2 : "无" },
        { name : "移风剑法", color : 3, skid : "yifengjian", type1 : "武器", type2 : "无" },
        { name : "天羽奇剑", color : 3, skid : "tianyuqijian", type1 : "武器", type2 : "无" },
    ],
    "刀法招架" : [
        { name : "五虎断门刀", color : 1, skid : "wuhuduanmendao", type1 : "武器", type2 : "无" },
        { name : "胡家刀法", color : 2, skid : "hujiadaofa", type1 : "武器", type2 : "招架" },
        { name : "狂风快刀", color : 3, skid : "kuangfengkuaidao", type1 : "武器", type2 : "无" },
        { name : "血刀", color : 5, skid : "xuedao", type1 : "无", type2 : "无" },
        { name : "移花接木", color : 4, skid : "yihuajiemu", type1 : "招架", type2 : "无" },
        { name : "斗转星移", color : 5, skid : "douzhuanxingyi", type1 : "无", type2 : "无" },
        { name : "乾坤大挪移", color : 5, skid : "qiankundanuoyi", type1 : "无", type2 : "无" },
    ],
    "棍法杖法" : [
        { name : "绝门棍", color : 1, skid : "juemengun", type1 : "武器", type2 : "轻功" },
        { name : "八卦棍法", color : 2, skid : "baguagun", type1 : "武器", type2 : "无" },
        { name : "中平枪法", color : 3, skid : "zhongpingqiang", type1 : "武器", type2 : "招架" },
        { name : "蒙古骑枪", color : 3, skid : "mengguqiqiang", type1 : "武器", type2 : "无" },
        { name : "蛇岛奇功", color : 2, skid : "shedaoqigong", type1 : "武器", type2 : "招架" },
        { name : "灵蛇杖法", color : 4, skid : "lingshezhangfa", type1 : "武器", type2 : "招架" },
    ],
    "鞭法暗器" : [
        { name : "云龙鞭法", color : 1, skid : "yunlongbian", type1 : "武器", type2 : "无" },
        { name : "秋风拂尘", color : 1, skid : "qiufengfuchen", type1 : "武器", type2 : "无" },
        { name : "银索金铃", color : 3, skid : "yinsuojinling", type1 : "武器", type2 : "无" },
        { name : "金蛇锥法", color : 2, skid : "jinshezhui", type1 : "武器", type2 : "无" },
        { name : "飞星术", color : 2, skid : "feixingshu", type1 : "武器", type2 : "无" },
    ],
}

/*
剑法,神剑诀,蓝色,shenjianjue,武器,无
杖法,无常杖,蓝色,wuchangzhang,武器,招架

公共内功,寒冰真气,4,
公共内功,先天功,4,
公共内功,蒙古心法,2,
公共内功,磐石神功,3,
公共内功,玉女心经,3,
公共轻功,摘星功,2,
公共轻功,身空行,2,
公共拳脚,一阳指,4,
公共剑法,神剑诀,2,
公共剑法,泰山剑法,3,
公共剑法,段家剑,3,
*/

getSkillById = function(skid) {
    for (const key in skillData) {
        for (let i = 0; i < skillData[key].length; i++) {
            var skill = skillData[key][i];
            if (skill.skid == skid) {
                console.log("getSkillById: " + skid);
                return JSON.parse(JSON.stringify(skill));
            }
        }
    }
}

sortArrayByBubble = function(array) {
    var a = array;
    var n = a.length;
    for (let i = 0; i < n - 1; i++) {
        for (let j = 0; j < n - 1 - i; j++) {
            if (a[j].color > a[j + 1].color) {
                var temp = a[j];
                a[j] = a[j + 1];
                a[j + 1] = temp;
            }
        }
    }
    console.log("技能排序");
}

</script>





<!-- 
赵敏的戒指
0,命中:＋180,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
1,命中＋198,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
2,命中＋216,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
3,命中＋252,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
4,命中＋306,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
5,命中＋378,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
6,命中＋468,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
7,命中＋576,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
8,命中＋702,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
9,命中＋846,最终伤害＋4%,忽视对方防御＋4%,绝招冷却时间-4%
10,命中＋1008,最终伤害＋4%,忽视对方防御＋4%,绝招冷却时间-4%
11,命中＋0,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%
12,命中＋0,最终伤害＋3%,忽视对方防御＋3%,绝招冷却时间-3%

杨不悔的项链
8,根骨:+117,悟性:+136,身法:+136,容貌:+7
9,根骨:+141,悟性:+164,身法:+164,容貌:+8
10,根骨:+168,悟性:+196,身法:+196,容貌:+9

 -->